<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>模态框</title>
</head>
<style>
    *{
      padding: 0;
      margin: 0;  
    }
    main{
        display: flex;
    }
    .left{
        width: 200px;
        height: 100vh;
        background-color: antiquewhite;
        z-index: 7;
    }
    .right{
        height: 100vh;
        flex: 1;
        background-color: aquamarine;
        z-index: 4;
    }
    .dialog{
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background-color:black;
        opacity: .5;
        z-index: 9999;
    }
</style>
<body>
    <main>
        <div class="left"></div>
        <div class="right">
            <div class="dialog">模态框</div>
        </div>
    </main>
</body>
</html>